#pragma once
#include "perceptron.h"

class QPerceptron :
    public Perceptron
{
public:

    QPerceptron(TransmitFunction * _tf,int _nin,double _lrate, int _layerId);

public:

    ~QPerceptron(void);

    double Simulate(std::vector<double>& _input);

    void UpdateWeight();

    void UpdateBPFactor(double t);

    void RandomInit();

    double BPMultiple(int _lid);

    void Serialize(ostream & os);

    void Deserialize(istream & is);

protected:
    double GetN(std::vector<double>& _input);

private:

    std::vector<double> u,v;
    double b;

};
